<template>
  <div class="app-container">
    <el-card>
      <template #header>
        <div class="card-header">
          <span>笔记分类管理</span>
          <el-button type="primary" @click="handleAdd">新增分类</el-button>
        </div>
      </template>

      <el-table v-loading="loading" :data="tableData" style="width: 100%">
        <el-table-column prop="id" label="ID" width="80" />
        <el-table-column prop="name" label="分类名称" />
        <el-table-column prop="description" label="描述" />
        <el-table-column prop="noteCount" label="笔记数量" width="100" />
      </el-table>
    </el-card>
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue'

const loading = ref(false)
const tableData = ref([
  {
    id: 1,
    name: '学习笔记',
    description: '日常学习记录',
    noteCount: 8
  }
])

const handleAdd = () => {
  // 新增逻辑
}

onMounted(() => {
  // 初始化数据
})
</script>

<style lang="scss" scoped>
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>
